<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
    <script src="../../scripts/jquery-1.11.3.min.js"></script>
    <script src="../../scripts/lib/echarts-2.2.7/esl.js"></script>
    <script src="../../scripts/lib/echarts-2.2.7/echarts.js"></script>
</head>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="chart1" style="height:100%;width:100%;"></div>
<!-- ECharts单文件引入 -->


<script type="text/javascript">
$(function() {

    // 路径配置
    require.config({
        paths: {
            echarts: '../../scripts/lib/echarts-2.2.7'
        }
    });

    require(
        [
            'echarts',
            'echarts/chart/pie' // 使用柱状图就加载bar模块，按需加载
        ],
        function(ec) {
            // 基于准备好的dom，初始化echarts图表
            var myChart = ec.init(document.getElementById('chart1'));
			
			 option = {
				tooltip : {
					trigger: 'item',
					formatter: "{a} <br/>{b} : {c} ({d}%)"
				},
				toolbox: {
					show : false,
					feature : {
						mark : {show: true},
						dataView : {show: true, readOnly: false},
						magicType : {
							show: true, 
							type: ['pie', 'funnel'],
							option: {
								funnel: {
									x: '25%',
									width: '50%',
									funnelAlign: 'left',
									max: 1548
								}
							}
						},
						restore : {show: true},
						saveAsImage : {show: true}
					}
				},
				calculable : true,
				series : [
					{
						name:'满意度',
						type:'pie',
						radius : '70%',
						center: ['50%', '50%'],
						data:[
							{value:335, name:'很满意'},
							{value:310, name:'满意'},
							{value:234, name:'一般'},
							{value:135, name:'不满意'},
							{value:234, name:'很不满意'},
						]
					}
				]
			};
                    		
                    
			
			
            // 为echarts对象加载数据 
            myChart.setOption(option);
			window.onresize = myChart.resize
        }
    );

})
</script>
</body>
</html>

